Techniques for configuring contacts of a connector

ABSTRACT

Systems and methods for configuring contacts of a first connector includes detecting mating of a second connector with the first connector and in response to the detection, sending a command over one of the contacts and waiting for a response to the command. If a valid response to the command is received, the system determines the orientation of the second connector. The response also includes configuration information for contacts in the second connector. The system then configures some of the other contacts of the first connector based on the determined orientation and configuration information of the contacts of the second connector.

CROSS-REFERENCES TO RELATED APPLICATIONS

This application claims benefit under 35 USC §119(e) to (a) U.S.Provisional Patent Application No. 61/556,792, filed on Nov. 7, 2011 and(b) U.S. Provisional Patent Application No. 61/565,463, filed on Nov.30, 2011, the disclosures of which are incorporated by reference intheir entirety for all purposes.

This application is related to U.S. patent application No. ______, filedon ______ (Attorney docket #90911-818777), the contents of which areincorporated by reference herein in its entirety for all purposes.

BACKGROUND

Connectors are ubiquitous and are used in variety of applications forcoupling two electronic devices. Most connectors usually have some sortof contacts that facilitate transmission of signals between the devicesconnected using a connector. Conventionally, each contact in a connectorhas a specific pre-assigned function. In other words, each contact in aconnector is designated to carry a certain type of signal, e.g., power,data, etc.

Many electrical connectors can only be connected in a singleorientation. These connectors have contacts that have pre-assignedfunctions which cannot be modified. Usually, these electrical connectorshave a physical design that allows for connection only in a singleorientation. In other words, two mating single orientation connectorscan only be mated one way. Thus, one has to be careful when using asingle orientation connector since plugging the connector in anincorrect manner can damage the connector and/or damage the device intowhich the connector is plugged in either physically, electrically, orboth.

SUMMARY

The present invention generally relates to connectors for connecting twodevices. Specifically, certain embodiments of the present inventionrelate to reversible connectors with configurable contacts. As describedabove, conventional connectors have contacts that have pre-assignedfunction. For example, in a standard USB connector, each of the fourcontacts has a specific function associated with it, e.g., power, data,etc. The location of these pre-assigned contacts within the connector isalso fixed. In sum, the contacts in such conventional connectors are notconfigurable and can perform only the pre-assigned function based on thetype and use of the connector.

Embodiments of the present invention provide techniques for dynamicallyconfiguring contacts of a host-side connector that is associated with ahost system. In one embodiment of the present invention, a contact inthe host-side connector is capable of being assigned one of severalfunctions. The function to be assigned to the contact (and othercontacts in the connector) may depend on the accessory coupled to thehost system and the signals provided/used by the accessory. For example,when an audio only accessory is coupled to the host system, at least oneof the contacts on the host-side connector can be configured to carryaudio data.

In some embodiments, a host-side connector and an accessory-sideconnector can mate with each other in more than one orientation. In theinstance where the host-side connector and the accessory-side connectorcan mate with each other in more than one orientation, it may bebeneficial to first determine the orientation of the accessory-sideconnector with respect to the host-side connector before configuring thecontacts of the host-side connector.

Certain embodiments of the present invention provide techniques fordetermining orientation of an accessory-side connector with respect to acorresponding host-side connector. According to one embodiment, once theaccessory-side connector is physically mated with the host-sideconnector, the host system sends a command to the accessory alternatelyover each of two selected contacts in the host-side connector and awaitsa reply from the accessory. Depending over which of the two selectedcontacts the reply is received on, the host system can determine theorientation of the accessory-side connector with respect to thehost-side connector.

In other embodiments, the contacts in the host-side connector areconfigured based on the determined orientation of the accessory-sideconnector. In an embodiment, the reply from the accessory may includeinformation about the function assigned to each contact of theaccessory-side connector. Using this information and the knowing theorientation of the accessory-side connector, the host system can thenconfigure the contacts of the host-side connector in order tocommunicate with the accessory.

In some embodiments, the detection of orientation and configuration ofcontacts can be independent of each other. In other embodiments, thedetection of orientation may precede and may be used to configure thecontacts of the host-side connector. In some embodiments, the contactsof the host-side connector can be in a floating mode prior to matingwith the accessory-side connector.

The following detailed description, together with the accompanyingdrawings will provide a better understanding of the nature andadvantages of the present invention.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1A illustrates a plug connector according to an embodiment of thepresent invention.

FIG. 1B is a front view of the plug connector according to an embodimentof the present invention.

FIG. 1C is cross-sectional view of the plug connector according to anembodiment of the present invention.

FIG. 1D is a pin-out of a plug connector according to an embodiment ofthe present invention.

FIG. 1E is a pin-out of a plug connector according to another embodimentof the present invention.

FIG. 2A illustrates a receptacle connector according to an embodiment ofthe present invention.

FIG. 2B cross-sectional view of the receptacle connector according to anembodiment of the present invention.

FIG. 2C illustrates a receptacle connector according to anotherembodiment of the present invention.

FIG. 2D is a cross-sectional view of a receptacle connector having eightsignal contacts and two connection detection contacts according to anembodiment of the present invention.

FIGS. 2E and 2F are diagrams illustrating a pinout arrangement of areceptacle connector according to two different embodiments of theinvention configured to mate with plug connectors 100 and 101,respectively, as shown in FIGS. 1D and 1E.

FIG. 3A is a schematic illustrating the plug connector being coupled tothe receptacle connector in a first orientation according to anembodiment of the present invention.

FIG. 3B is a schematic illustrating the plug connector being coupled tothe receptacle connector in a second orientation according to anembodiment of the present invention.

FIG. 4 is a schematic illustrating a system for determining orientationof one connector with respect to another connector according to anembodiment of the present invention.

FIG. 5 is a flow diagram of a process for determining orientation of oneconnector with respect to other according to an embodiment of thepresent invention.

FIG. 6 is a flow diagram of a process for configuring contacts of aconnector according to an embodiment of the present invention.

FIG. 7A illustrates a command structure according to an embodiment ofthe present invention.

FIG. 7B illustrates a response structure for the command according to anembodiment of the present invention.

FIG. 8A is a simplified cross-sectional view of a plug connector matedwith a receptacle connector in a first orientation according to anembodiment of the present invention.

FIG. 8B is a simplified cross-sectional view of a plug connector matedwith a receptacle connector in a second orientation according to anembodiment of the present invention.

FIGS. 9A and 9B is a flow diagram of a process for determiningorientation and configuring contacts of a connector based on theorientation according to another embodiment of the present invention.

DETAILED DESCRIPTION

Embodiments of the present invention generally relate to connectors.More specifically, certain embodiments of the present invention providetechniques for determining orientation of one connector with respect toanother connector. In some embodiments, an accessory-side or “plug”connector may be insertable into a host-side or “receptacle” connectorin more than one orientation. In this instance, the techniques describedherein may provide a method to determine the exact orientation of theplug connector with respect to the receptacle connector.

Some embodiments of the present invention provide techniques fordynamically configuring contacts of a host-side connector based oninformation received from a connected accessory.

Certain embodiments of the present invention provide systems and methodsfor determining orientation of an accessory-side connector with respectto a host-side connector and configuring the host-side connector basedon the determined orientation and information received from theaccessory.

FIG. 1A illustrates a plug connector 100 (or accessory-side connector100) according to an embodiment of the present invention. Plug connector100 is exemplary and is used herein to explain the various embodimentsof the present invention. One skilled in the art will realize that manyother forms and types of connectors other than plug connector 100 can beused and that techniques described herein will apply to any plugconnector that has the characteristics of plug connector 100. In someembodiments, plug connector 100 may be associated with an accessory thatcan be coupled to a host device.

Plug connector 100 includes a body 102 and a tab portion 104. A cable106 is attached to body 102 and tab portion 104 and extendslongitudinally away from body 102 in a direction parallel to the lengthof the connector 100. Tab 104 is sized to be inserted into acorresponding receptacle connector during a mating event and includes afirst contact region 108 a formed on a first major surface 104 a and asecond contact region 108 b (not shown in FIG. 1A) formed at a secondmajor surface 104 b (also not shown in FIG. 1A) opposite surface 104 a.Surfaces 104 a, 104 b extend from a distal tip of the tab to a spine 109that, when tab 104 is inserted into a corresponding receptacleconnector, abuts a housing of the receptacle connector or portableelectronic device the receptacle connector is incorporated in. Tab 104also includes first and second opposing side surfaces 104 c, 104 d (notshown) that extend between the first and second major surfaces 104 a,104 b. In one particular embodiment, tab 104 is about 6.6 mm wide, about1.5 mm thick and has an insertion depth (the distance from the tip oftab 104 to spine 109) of about 7.9 mm.

A plurality of contacts 112 can be formed in each of contact regions 108a and 108 b such that, when tab 104 is inserted into a correspondingreceptacle connector, contacts 112 in regions 108 a or 108 b areelectrically coupled to corresponding contacts in the receptacleconnector. In some embodiments, contacts 112 are self-cleaning wipingcontacts that, after initially coming into contact with a receptacleconnector contact during a mating event, slide further past thereceptacle connector contact with a wiping motion before reaching afinal, desired contact position.

As an example, in one embodiment an ID module is embodied within an ICoperatively coupled to the contacts of connector 100. The ID module canbe programmed with identification and configuration information aboutthe connector and/or its associated accessory/adapter that can becommunicated to a host device during a mating event. As another example,an authentication module programmed to perform an authenticationroutine, for example a public key encryption routine, with circuitry onthe host device can be embodied within an IC operatively coupled toconnector 100. The ID module and authentication module can be embodiedwithin the same IC or within different ICs. As still another example, acurrent regulator can be embodied within one of IC's 113 a or 113 b. Thecurrent regulator can be operatively coupled to contacts that are ableto deliver power to charge a battery in the portable electronic deviceand regulate current delivered over those contacts to ensure a constantcurrent regardless of input voltage and even when the input voltagevaries in a transitory manner. The function of the IC's is furtherdescribed below in reference to FIG. 4.

Bonding pads 115 can also be formed within body 102 near the end of PCB107. Each bonding pad can be connected to a contact or contact pairwithin regions 108 a and 108 b. Wires (not shown) can then be solderedto the bonding pads to provide an electrical connection from thecontacts to circuitry within an accessory associated with connector 100.In some embodiments, however, bonding pads are not necessary and insteadall electrical connections between the contacts and components ofconnector 100 and other circuitry within an accessory are made throughtraces on a PCB that the circuitry is coupled to and/or by interconnectsbetween multiple PCBs within the accessory.

The structure and shape of tab 104 is defined by a ground ring 105 thatcan be made from stainless steel or another hard conductive material.Connector 100 includes retention features 114 a, 114 b (not shown)formed as curved pockets in the sides of ground ring 105 that double asground contacts. Body 102 is shown in FIG. 1A in transparent form (viadotted lines) so that certain components inside the body are visible. Asshown, within body 102 is a printed circuit board (PCB) 107 that extendsinto ground ring 105 between contact regions 108 a and 108 b towards thedistal tip of connector 100. One or more integrated circuits (ICs), suchas Application Specific Integrated Circuit (ASIC) chips 113 a and 113 b,can be operatively coupled to PCB 107 to provide information regardingconnector 100 and/or to perform specific functions, such asauthentication, identification, contact configuration and current orpower regulation.

FIG. 1B illustrates a front view of plug connector 100. The front viewillustrates a cap 120. Cap 120 can be made from a metal or otherconductive material and can extend from the distal tip of connector 100along the side of the connector towards body 102 either fully orpartially surrounding contacts 112 formed in contact regions 108 a and108 b in the X and Y directions. In some embodiments, cap 120 can begrounded in order to minimize interference that may otherwise occur oncontacts 112 of connector 100 and can thus be referred to as a groundring, e.g., ground ring 105 illustrated in FIG. 1A. Contacts 112 ₍₁₎-112_((N)) can be positioned within contact region 108 a and additionalcontacts 114 ₍₁₎-114 _((N)) can be positioned within region 108 b on theopposing surface of tab 104. In some embodiments, N can be between 2 and8. Contacts 112 ₍₁₎ . . . 112 _((N)) and 114 ₍₁₎ . . . 114 _((N)) can beused to carry a wide variety of signals including digital signals andanalog signals as well as power and ground.

FIG. 1C illustrates a cross-sectional schematic view of contacts 112,114 and positioning of the contacts. Contacts 112, 114 can be mounted oneither side of a PCB 150 as illustrated. In some embodiments, opposingcontacts, e.g., 112 ₍₁₎ and 114 ₍₁₎ may be shorted or electricallyconnected to each other through PCB 150, e.g., using a via, to create anin-line connector design. In other embodiments, all contacts may beindependent with no connections between any of the contacts or thecontacts may have other connections schemes between them. In theinstance where each contacts is independent and not connected to anyother contact, a different receptacle connector, e.g., connector 250 ofFIG. 2C, may be used. Contacts 112, 114 can be made from a copper,nickel, brass, a metal alloy or any other appropriate conductivematerial. Spacing is consistent between each of the contacts on thefront and back sides and between the contacts and the edges of theconnector providing 180 degree symmetry so that plug connector 100 canbe inserted into a corresponding receptacle connector in either of twoorientations.

When connector 100 is properly engaged with a receptacle connector, eachof contacts 112 ₍₁₎-112 _((N)) or 114 ₍₁₎-114 _((N)) is in electricalconnection with a corresponding contact of the receptacle connector.

FIG. 1D illustrates a pin-out configuration for connector 100 accordingone particular embodiment of the present invention as described inconnection with FIG. 1C above.

The pin-out shown in FIG. 1D includes four contacts 112(4), 112(5),114(4), and 114(5) that are electrically coupled together to function asa single contact dedicated to carrying power to a connected host device.Connector 100 may also include accessory ID contacts 112(8) and 114(8);accessory power contacts 112(1) and 114(1); and eight data contactsarranged in four pairs. The four pairs of data contacts may be (a)112(2) and 112(3), (b) 112(6) and 112(7), (c) 114(2) and 114(3), and (d)114(6) and 114(7). Host power contacts 112(4), 112(5), 114(4), and114(5) carry power from an accessory associated with connector 100 to aportable electronic device that is coupled to the accessory viaconnector 100. The host power contacts can be sized to handle anyreasonable power requirement for an electronic device or host device,and for example, can be designed to carry between 3-20 Volts from anaccessory to charge the portable electronic device connected toconnector 100. In this embodiment, host power contacts 112(4), 112(5),114(4), and 114(5) are positioned in the center of contact regions 108a, 108 b to improve signal integrity by keeping power as far away aspossible from the sides of ground ring 105.

Accessory power contacts 112(1) and 114(1) can be used for an accessorypower signal that provides power from the electronic device (i.e. thehost device) to an accessory. The accessory power signal is typically alower voltage signal than the host power in signal received over hostpower contacts 112(4) and 112(5), for example, 3.3 volts as compared to5 volts or higher. The accessory ID contacts provide a communicationchannel that enables the host device to authenticate the accessory andenable the accessory to communicate information to the host device aboutthe accessory's capabilities as described in more detail below.

The four pairs of data contacts (a) 112(2) and 112(3), (b) 112(6) and112(7), (c) 114(2) and 114(3), and (d) 114(6) and 114(7) may be used toenable communication between the host and accessory using one or more ofseveral different communication protocols. For example, data contacts112(2) and 112(3) are positioned adjacent to and on one side of thepower contacts, while data contacts 112(6) and 112(7) are positionedadjacent to but on the other side of the power contacts. A similararrangement of contacts can be seen for contacts 114 on the othersurface of the PCB. The accessory power and accessory ID contacts arepositioned at each end of the connector. The data contacts can be highspeed data contacts that operate at rate that is two or three orders ofmagnitude faster than any signals sent over the accessory ID contactwhich makes the accessory ID signal look essentially like a DC signal tothe high speed data lines. Thus, positioning the data contacts betweenthe power contacts and the ID contact improves signal integrity bysandwiching the data contacts between contacts designated for DC signalsor essentially DC signals.

FIG. 1E illustrates a pin-out configuration for a connector 101according another particular embodiment of the present invention.

Connector 101 is a also a reversible connector just like connector 100.In other words, based on the orientation in which connector 101 is matedwith a corresponding connector of a host device, either the contacts onthe surface 108 a or 108 b are in physical and electrical contact withthe contacts in the corresponding connector of the host device. Asillustrated in FIG. 1E, connector 101 may have eight contacts arrangedon an upper surface of a PCB 150 and eight contacts arranged on a lowersurface of PCB 150.

Connector 101 includes two contacts 112(1) and 114(4) that can functionas accessory ID contacts to carry the identification signals between theaccessory and the portable electronic device. Contacts 112(1) and 114(4)are electrically connected to each other as illustrated in FIG. 1E.Connector 101 can have four pairs of data contacts, (a) 112(2) and112(3), (b) 112(6) and 112(7), (c) 114(2) and 114(3), and (d) 114(6) and114(7). In this particular embodiment, opposing data contacts, e.g.,112(2) and 114(2), are electrically connected to each other via PCB 150as illustrated in FIG. 1E. Connector 101 may further include host powercontacts 112(4) or 114(5) that may be electrically connected to eachother. Host power contacts 112(4) or 114(5) can carry power to the hostdevice that is mated with connector 101. For example, plug connector 101may be part of a power supply system designed to provide power to thehost device. In this instance, either contact 112(4) or 114(5) may carrypower from the power supply to the host device, e.g., to charge abattery in the host device.

Connector 101 may further include accessory power contacts 112(5) and114(8) that may be electrically connected to each other, e.g., via PCB150. Accessory power contacts carry power from the host device to aconnected accessory. For example, in some instances, an accessoryconnected to the host device may not be self-powered and may derive itspower from the host device. In this instance, the host device can supplypower to the accessory over either of the accessory contacts, dependingon the orientation of connector 101 with respect to a correspondingconnector of the host device. Connector 101 may further include twoground contacts 112(8) and 114(1) electrically connected to each other.The ground contacts provide a ground path for connector 101.

FIG. 2A illustrates a receptacle connector 200 according to anembodiment of the present invention. Receptacle connector 200 includes ahousing 202 that defines a cavity 204 and houses N contacts 206 ₍₁₎-206_((N)) within the cavity. In operation, a connector plug, such as plugconnector 100 (or connector 101) can be inserted into cavity 204 toelectrically couple the contacts 112 ₍₁₎-112 _((N)) or 114 ₍₁₎-114_((N)) to respective contacts 206 ₍₁₎-206 _((N)). Each of the receptacleconnector contacts 206 ₍₁₎-206 _((N)) electrically connects itsrespective plug contact to circuitry associated with the electrical/hostdevice in which receptacle connector 200 is housed. For example,receptacle connector 200 can be part of a portable media device andelectronic circuitry associated with the media device is electricallyconnected to receptacle 200 by soldering tips of contacts 206 ₍₁₎-206_((N)) that extend outside housing 202 to a multilayer board such as aprinted circuit board (PCB) within the portable media device. Note thatconnector 200 includes contacts on just a single side so it can be madethinner. In other embodiments, connector 200 may have contacts on eachside.

FIG. 2B illustrates a cross section view of receptacle connector 200according to an embodiment of the present invention. As illustrated, insome embodiments, Additional contacts 208 ₍₁₎ and 208 ₍₂₎ are located ateither ends of contacts 206 ₍₁₎-206 _((N)). Contacts 208 ₍₁₎ and 208 ₍₂₎may be used to detect whether the plug connector is fully inserted intocavity 204 or inserted to a point where contacts 112 (or 114) of plugconnector 100 (or connector 101) are physically coupled to contacts 206of receptacle connector 200. In some embodiments, contacts 208 ₍₁₎ and208 ₍₂₎ can also be used to detect whether the plug connector has beendisconnected from the receptacle connector. In some embodiments,contacts 208 can make contact with cap 120 of plug connector 100 whenthe plug connector is inserted beyond a certain distance within cavity204. In some embodiments, contacts 208 are placed such that they willmake contact with the ground ring of plug connector only when contacts112 make a solid physical connection with contacts 206. In someembodiments, when contacts 208 connect to the ground ring of the plugconnector, a signal may be generated indicating the connection.

In some embodiments, the receptacle connector may have contacts both onthe top side and the bottom side of cavity 204. FIG. 2C illustrates across-sectional view of a receptacle connector 251 that includescontacts 207 ₍₁₎-207 _((N)) on the top and contacts 206 ₍₁₎-206 _((N))on the bottom. In some embodiments, a plug connector with electricallyisolated contacts on the top and the bottom side may use the receptacleconnector 251 of FIG. 2C.

In some embodiments, the receptacle connector may have contacts 206_((1)-(N)) only on a single side inside cavity 204 as described above.In a particular embodiment, receptacle connector 250 may have eight (8)contacts 206 ₍₁₎-206 ₍₈₎ as illustrated in FIG. 2D. Some or all of thesecontacts may be configured to perform one of several functions dependingon the signals available on a plug connector. Plug connector 100 (orconnector 101) may be associated any one of several accessories that maybe designed to work with a host device that is associated withreceptacle connector 250. For example, plug connector 100 (or connector101) may be associated with an audio only accessory in which case thesignals available on the contacts, e.g., 106 ₍₁₎-106 _((N)), of the plugconnector may include audio and related signals. In other instances,where plug connector 100 (or connector 101) is associated with a morecomplex accessory such as video accessory, the contacts of plugconnector may carry audio, video, and related signals. Thus, in order toenable receptacle connector 250 to be operable with various differenttypes of signal, contacts 206 ₍₁₎₋₍₈₎ of receptacle connector 250 can bemade configurable based on the signals available from a plug connector100 (or connector 101).

In the particular embodiment illustrated in FIG. 2D, receptacleconnector 250 has eight contacts 206 ₍₁₎₋₍₈₎ in addition to twoconnection detection contacts 208 ₍₁₎ and 208 ₍₂₎. The operation of theconnection detection contacts 208 ₍₁₎ and 208 ₍₂₎ is described above inrelation to FIG. 2B. Some or all of contacts 206 ₍₁₎₋₍₈₎ may have anassociated switch that can configure the contact to carry one of manypossible signals, e.g., as illustrated in FIG. 4. However, for ease ofexplanation only one switch 220 coupled to contact 206 ₍₈₎ isillustrated in FIG. 2D. It is to be noted that some other contacts fromamong contacts 206 ₍₁₎-206 ₍₈₎ may each have a similar switch 220coupled to it. As illustrated in FIG. 2D, switch 220 can be used toconfigure contact 206 ₍₈₎ to carry any one of signals S₁-S_(n) dependingon the configuration of the plug connector.

In a particular embodiment, contact 206 ₍₁₎ may be an identification buspin (ACC_ID) and can be configured to communicate a command operable tocause an accessory to perform a function and provide a response to ahost device unique to the command. The command may be any one or more ofa variety of commands, including a request to identify a connector pinand select one of a plurality of communication protocols forcommunicating over the identified connector pin, a request to set astate of the accessory, and a request to get a state of the accessory.Contact 206 ₍₁₎ may also or alternatively be configured to communicatepower from the host device to the accessory (e.g., Acc_Pwr). Forexample, contact 206 ₍₁₎ may be coupled to a positive (or negative)voltage source within the host device so as to generate a voltagedifferential with another contact (such as a ground contact which maybe, e.g., contact 206 ₍₈₎).

In a particular embodiment, contacts 206 ₍₂₎ and 206 ₍₃₎ may form afirst pair of data contact (DP1/DN1). The data contacts may beconfigured to carry one or more of a variety of signals, such as (a) USBdifferential data signals, (b) non-USB differential data signal, (c)UART transmit signal, (d) UART receive signal, (e) digital debuginput/output signals, (f) a debug clock signal, (g) audio signals, (h)video signals, etc.

In a particular embodiment, contact 206 ₍₄₎ may carry incoming power(e.g., a positive voltage relative to another contact such as a groundpin) to the host device (e.g., from a power source in or coupled to theaccessory) with which receptacle connector 200 is associated. Contact206 ₍₅₎ may also function as an identification bus pin (ACC_ID) similarto contact 206 ₍₁₎ described above. Contact 206 ₍₅₎ may also oralternatively be configured to communicate power from the host device tothe accessory (e.g., Acc_Pwr), depending on the orientation of aconnected plug connector 100 (or connector 101) with respect toreceptacle connector 200.

In a particular embodiment, contacts 206 ₍₆₎ and 206 ₍₇₎ may form asecond pair of data pins (DP2/DN2) and can each be configured to carryone or more of a variety of signals, such as (a) USB differential datasignals, (b) non-USB differential data signal, (c) UART transmit signal,(d) UART receive signal, (e) digital debug input/output signals, (f) adebug clock signal, (g) audio signals, (h) video signals, etc.

In a particular embodiment, contact 206 ₍₈₎ may be a ground pin orotherwise provided at a voltage potential lower than contacts 206 ₍₁₎,206 ₍₄₎, and 206 ₍₅₎ so as to provide a voltage potential for powerbeing provided to or from the host device.

In some embodiments, tab 104 has a 180 degree symmetrical, doubleorientation design which enables plug connector 100 (or connector 101)to be inserted into receptacle 200 in both a first orientation and asecond orientation. FIGS. 3A and 3B are schematic views illustrating thedifferent orientations that connector 100 (or connector 101) can bemated with connector 200. As illustrated in FIG. 3A, connector 100 (orconnector 101) can be mated with connector 200 where contacts 112 ofconnector 100 (or connector 101) can couple with contacts 206 ofconnector 200. We can refer to this as the first orientation forpurposes of explanation. Details of several particular embodiments ofconnector 100 (and connector 101) are described in a commonly-owned U.S.patent application Ser. No. ______ (Attorney Docket No. 90911-832034),filed on ______, the contents of which are incorporated by referenceherein in their entirety for all purposes.

FIGS. 2E and 2F illustrate pin-out configuration for a receptacleconnector according to two different embodiments of the presentinvention. In one embodiment, receptacle connector 200 has a pin-out asshown in FIG. 2E that matches pin-out of connector 100 in FIG. 1D and inanother embodiment receptacle connector 200 has a pin-out as shown inFIG. 2F that matches pin-out of connector 101 of FIG. 1E. In each ofFIGS. 2E and 2F, the ACC1 and ACC2 pins are configured to mate witheither the accessory power (ACC_PWR) or accessory ID (ACC_ID) pins ofthe plug connector depending on the insertion orientation of plugconnector, the pair of Data A contacts is configured to mate with eitherthe pair of Data 1 contacts or the pair of Data 2 contacts of the plugconnector, and the P_IN (power in) pin or pins are configured to matewith the Host Power contact or contacts of the plug connector.Additionally, in the pin-out of FIG. 2F, the GND contact is configuredto mate with the GND contact in the plug connector.

In some embodiments, connector 100 (or connector 101) can be mated withconnector 200 in a second orientation as illustrated in FIG. 3B. In thesecond orientation, contacts 114 of connector 100 (or connector 101) arecoupled with contacts 206 of connector 200. As illustrated in FIGS. 3Aand 3B, the second orientation may be 180 degrees rotated from the firstorientation. However, these are not the only possible orientations. Forexample, if connector 100 (or connector 101) is a square connector witha corresponding square connector 200, then connector 100 (or connector101) can be mated with connector 200 in one of four possibleorientations. Thus, one skilled in the art will realize that more thantwo orientations for the connectors may be possible.

FIG. 4 is a block diagram of a system 400 according to an embodiment ofthe present invention. System 400 includes an electronic device/hostdevice 402. Host device 402 can be a PC, a PDA, a mobile computingdevice, a media player, a portable communication device, a laptopcomputer, a tablet computer, or the like. Host device 402 may include amicrocontroller 412 and a connector 404 that is coupled tomicrocontroller 402. Connector 404 can be implemented, e.g., asconnector 200 of FIG. 2A. It is to be noted that host device 402 mayinclude other components in addition to microcontroller 412. However theadditional components are omitted here for the sake of clarity as theydo not directly pertain to the embodiments described herein.

Microcontroller 412 can be implemented using one or more integratedcircuits, one or more single-core or dual-core processors, or the like.In some embodiments, microcontroller 412 can include orientationdetection circuitry 420 for detecting orientation of a accessory-sideconnector coupled to connector 404.

Connector 404 can be implemented, e.g., as connector 200 of FIG. 2A.Connector 404 may have multiple contacts 206 ₍₁₎-206 _((N)). Some of thecontacts of connector 404 may be capable of being assigned one ofseveral functions based on several factors including but not limited tothe orientation in which connector 406 is mated with connector 404. Inother words, contacts of connector 404 can be multiplexed to performseveral different functions. Each of the contacts in connector 404 iselectrically coupled to some circuitry disposed in device 402. Asillustrated in FIG. 4, several of the contacts of connector 404 arecoupled to switches 1-N. In some embodiments, depending on the detectedorientation, switches 1-N may configure these contacts to perform one ofseveral functions. For example, the functions may include differentialdata signals, USB power and/or data, UART transmit and/or receive, testports, debug ports, operational power, etc. Each switch may be used toconfigure its associated contact to carry one of many available signals.The configuration of the plug connector 406 discussed below.

System 400 also includes connector 406, which can be a correspondingconnector that mates with connector 404. For example, if connector 404is a receptacle connector, the connector 406 may be a corresponding plugconnector. In some embodiments, connector 406 may be implemented, e.g.,as connector 100 (or connector 101) described above. Connector 406 maybe associated with an accessory that is designed to be used with device402. Connector 406 may also has several contacts. When connector 406 isphysically mated with connector 404, at least one set contacts ofconnector 406 are physically and electrically connected to the contactsin connector 404. This results in the electrical coupling of thecontacts in connector 406 with device 402 via connector 404. Asdiscussed above, since connector 406 is reversible, either the contacts112 ₍₁₎ to 112 _((N)) are in electrical connection with contacts 206₍₁₎-206 _((N)) of connector 404 or contacts 114 ₍₁₎ to 114 _((N)) are inelectrical connection with contacts 206 ₍₁₎-206 _((N)) of connector 404.However device 402 may not know which set of contacts of connector 406are coupled to contacts in connector 404. For a given accessory, eachcontact of associated connector 406 may have a predefined functionassociated with it. As described above, the type of signals carried byconnector 406 may depend on the type of accessory that it is associatedwith. For example, if connector 406 is associated with a charge/synccable, the contacts of connector 406 may carry at least a power signaland a communication signal, among others. Thus, at the time connector406 is mated with connector 404, the information carried by each contactin connector 406 may be pre-defined. This information may be transmittedto host device 402 so that host device 402 can configure contacts 206₍₁₎-206 _((N)) of connector 404 appropriately. Accordingly, before amating event between connectors 404 and 406, contacts of connector 404are placed in a “floating” mode. In other words contacts of connector404 are isolated from other circuitry within host device 402.

Thus, before contacts 206 ₍₁₎-206 _((N)) of connector 404 can beconfigured; it may be beneficial to understand the orientation ofconnector 406 with respect to connector 404. In other words, it would bebeneficial to understand which of the two sets of contacts, e.g., 112₍₁₎ to 112 _((N)) or 114 ₍₁₎ to 114 _((N)), of connector 406 arecurrently coupled to contacts 206 ₍₁₎-206 _((N)) of connector 404. Inorder to determine this, a process referred to herein as orientationdetection may be performed.

However, before the orientation detection process can begin, device 402may ensure that connector 406 is mated securely with connector 404, i.e.at least some contacts in both connectors are in physical contact witheach other. This is done to ensure that the two connectors are properlymated and that there is reduced risk of arcing or shorting due to apotentially floating, partially connected, or unconnected power contact.In order to determine physical mating between connectors 404 and 406, aprocess referred to herein as connection detection may be performed.

Before the host device can initiate communication with an accessory, itmay be beneficial to determine whether the plug and the receptacleconnectors are physically connected or “mated” with each other. Asdescribed above, a receptacle connector, e.g., connector 404, has aconnection detection contact, e.g., contact 208 ₍₁₎ illustrated in FIG.2B, which is recessed from the other contacts in the receptacleconnector. This connection detection contact, labeled as “Con Detect” inFIG. 4, is a last make/first break type of contact. In other words, asplug connector 406 is mated with receptacle connector 404, theconnection detection contact is the last contact in connector 404 tomake physical contact with any portion of connector 406. During anun-mating sequence, this connection detection contact is the firstcontact in connector 404 to physically disengage from connector 406. Insome embodiments, the connection detection contact is coupled tomicrocontroller 412 via a signal line 414. When connector 406 is notmated with connector 404, signal line 414 is held in a logic “high”state by microcontroller 412. Thus, as long as signal line 414 is in alogic “high” state, the host device may conclude that no connector hasbeen mated with connector 404.

When connector 406 is mated with connector 404, a certain distance aftertravelling within the cavity of connector 406, a ground ring, e.g., cap120 of FIG. 1, of connector 406 makes physical contact with theconnection detection connector. This causes signal line 414 totransition from the logic “high” state to a logic “low” state.Microcontroller 412 can detect this change in state of signal line 414and determine that connector 406 is now physically connected withconnector 404. In some embodiments, based on the physical design of thetwo connectors, when signal line 414 goes into the logic “low” state, itcan be concluded that other contacts in the plug connector are also inphysical connection with corresponding contacts in the receptacleconnector. In some embodiments, the detection of this mating triggersfurther processes such as orientation detection, accessoryauthentication, contact configuration, etc. as described below.

In some embodiments, the connection detection contact can also be usedfor disconnection detection. In some embodiments, in order to protectdevice 402 from unauthorized accessories that may cause harm, all theswitches within device 402, e.g., Switches 1-N and the OD1 and OD2switches, are held in an open state prior to detection of a connectionevent. Similarly it would be desirable that once connector 406 isdisconnected, these switches are returned to their “open” state so thatno harmful signals can be communicated to device 402.

When connector 406 is un-mated or disconnected from connector 404, theconnection detection contact is the first contact that loses physicalconnection with connector 406 (recall this is a last make/first breaktype contact). Once the connection detection contact becomes physicallydisengaged from connector 406, signal line 414 returns to its logic“high” state. Microcontroller 412 can detect this change in state andconclude that connector 406 has been disengaged from connector 404.Based on this determination, microcontroller may operate one or more ofthe switches to place them in an “open” state thus protecting theinternal circuitry of device 402 from potential arcing and shortinghazard if any of the corresponding contacts of the plug connector havepower on them.

At a later time if connector 406 is once again mated to connector 404,device 402 may again perform the connection detection process describedabove.

As described above, in some embodiments, the accessory-side connector,e.g., connector 406, can be mated with the host-side connector, e.g.,connector 404 in more than one orientation. In such an instance, it maybe desirable to determine the orientation of the accessory-sideconnector with respect to the host-side connector in order to properlyroute signals between the host device and the accessory.

In some embodiments, one or more of the contacts in connector 404 may beused for determining orientation. As described earlier, all switchesinside microcontroller 412 that control the respective contacts ofconnector 404 are initially in an “open” state. In the embodiment ofFIG. 4, two contacts, illustrated as OD1 and OD2, can be used todetermine orientation. In order to describe the orientation detectionand contact configuration processes, consider for example that contacts206 ₍₁₎ (designated as “OD2” in FIG. 4) and 206 ₍₈₎ (designated as “OD1”in FIG. 4) can be chosen from among contacts 206 ₍₁₎-206 _((N)) ofconnector 404. Each of these contacts OD1 and OD2 are connected tocorresponding switches 416 and 418, respectively. It is to be understoodthat any other contacts from connector 404 may also be chosen andcontacts 206 ₍₁₎ and 206 ₍₁₎ are merely being used herein to explain thetechniques. Similar to the contacts 206 ₍₁₎-206 _((N)), contacts OD1 andOD2 can also be configured to perform one of several functions. In someembodiments, contacts OD1 and OD2 may be first used to detectorientation and then later may be configured to perform certain otherfunctions once the orientation detection is complete, e.g., carrycommunication signals between the accessory and the host device and/orcarry accessory power from the host device to the accessory. In someembodiments, contacts 206 ₍₁₎-206 _((N)) in connector 404 may befloating prior to the completion of the orientation detection process.“Floating” in this context means that the contacts 206 ₍₁₎-206 _((N))may not be assigned any function prior to the orientation detection andare in an deactivated or isolated state. This may be accomplished byhaving one or more of switches 1-N in an “open” state.

In some embodiments, orientation detection circuitry 420 may be coupledto contacts OD1 and OD2 and can monitor contacts OD1 and OD2 to detectpresence of a particular or expected signal on either of the contacts.Orientation detection circuitry 420 can send a command over any of thecontacts OD1 and OD2 and detect a response to the command. This will beexplained in detail below.

In some embodiments, system 400 may include an ID module 408. ID module408 may be implemented as an Application Specific Integrated Circuit(ASIC) chip programmed to perform a specific function, e.g., as one ofchips 113 a or 113 b of FIG. 1A. In some embodiments, ID module 408 maybe disposed in the accessory that connects with host device 402. Inother embodiments, ID module 408 may be an integral part of connector406 and may be disposed within a housing of connector 406, e.g., asillustrated in FIG. 1A. In some embodiments, ID module 408 may receive acommand from host device 402 via contact OD2 and may respond with apredetermined response to the command over the same contact OD2. In someembodiments, ID module 408 is closely integrated with connector 406. Inother words, ID module 408 and connector 406 may be disposed in anaccessory that is configured to be operable with device 402. Thus, in aninstance where the accessory is a cable, connector 406 and ID module 408can be part of the cable. In some embodiments, ID module 408 may includeconfiguration information associated with the contacts of connector 406with which it is associated. Upon successful connection with host device402, ID module 408 may provide the configuration information to hostdevice 402 as described below.

In some embodiments, system 400 may also include accessory hardware 410.Accessory hardware 410 can be a processor and other associated circuitryof an accessory that is designed to be operable with device 402. In someembodiments, an accessory may provide power to device 402 and in otherembodiments; the accessory may be powered by device 402. Accessoryhardware 410 will vary depending on type and function of the accessory.

It will be appreciated that the system configurations and componentsdescribed herein are illustrative and that variations and modificationsare possible. The device and/or accessory may have other components notspecifically described herein. Further, while the device and theaccessory are described herein with reference to particular blocks, itis to be understood that these blocks are defined for convenience ofdescription and are not intended to imply a particular physicalarrangement of component parts. Further, the blocks need not correspondto physically distinct components. Blocks can be configured to performvarious operations, e.g., by programming a processor or providingappropriate control circuitry, and various blocks might or might not bereconfigurable depending on how the initial configuration is obtained.Embodiments of the present invention can be realized in a variety ofdevices including electronic devices implemented using any combinationof circuitry and software.

In operation, in an embodiment of the present invention, when connector406 is physically mated with connector 406, signal line 414 changes itsstate from logic “high” to logic “low” when the connection detectioncontact of connector 404 makes physical contact with the ground ringportion of connector 406. This indicates to device 402 that connector406 is now connected to connector 404. Thereafter, microcontroller 412initiates the orientation detection operation.

Connector 406 is configured such that one contact within connector 406carries an identification signal, e.g., ID contact 422 which maycorrespond to one of contacts OD1 or OD2 described above. Once thecontact carrying the accessory identification signal is identified,device 402 can determine an orientation of connector 406 with respect toconnector 404. As described above in relation to FIGS. 3A and 3B,connector 406 can be mated with connector 404 in more than oneorientation. As also as described above, in order to illustrate theorientation detection process, we considered that either contact OD1 orOD2 of connector 404 is connected with ID contact 422 of connector 406.Thus, in one orientation, ID contact 422 can be connected to contact OD2of connector 404 and in a second orientation, which is 180 degrees fromthe first orientation; ID contact 422 can be connected to contact OD2 ofconnector 404. In order to determine which of contacts OD1 or OD2 isconnected to ID contact 422, the following process may be used.

Once it is determined that connector 406 is mated with connector 404,one of the switches 416 or switch 418 is closed so that the contactcorresponding to the closed switch is now “active.” In other words, thecontact associated with the closed switch is now in electricalconnection with corresponding contact in connector 406. As describedabove, both switches 416 and 418 are in an “open” state when connector404 and connector 406 are first mated with each other. Consider thatswitch 416 is closed first. In this instance, switch 418 is kept open toavoid any power or other harmful signal from appearing on the associatedOD2 contact. In the instance illustrated in FIG. 4, closing switch 416results in the contact OD1 being electrically coupled to accessory powerline via connector 406. It is to be understood the contact OD1 may alsohave been connected to ID module 408 depending on which orientationconnector 406 was connected to connector 404 (as shown by dotted line inFIG. 4). However, to explain the orientation detection process, FIG. 4assumes that contact OD1 is connected to accessory power line whilecontact OD2 is connected to ID module 408.

Once switch 416 is closed, microcontroller 412 sends a command over theOD1 contact, e.g., using OD circuitry 420. OD circuitry 420 then“listens” for a specific and/or expected response to the command on theOD1 contact. In some embodiments, the command is interpretable only byID module 408, which in turn generates a response to the command.However, in this example, the OD1 contact is coupled to the accessorypower line and not to ID module 408. Therefore, ID module 408 does notreceive the command and thus does not generate a response to thecommand. Consequently, no response to the command is received by ODcircuitry 420 via the OD1 contact.

If after a predetermined time OD circuitry 420 does not detect aresponse on the OD1 contact, microcontroller 412 concludes the OD1contact is not connected to ID module 408 on the accessory side andopens switch 416. Thereafter, microcontroller 412 closes switch 418.This causes contact OD2 to be now electrically connected to ID module408 via ID contact 422. Thereafter, OD circuitry 420 sends the samecommand as above over the OD2 contact. Because the OD2 contact isconnected to ID module 408, once ID module 408 receives the command, itgenerates and sends a response over the OD2 contact to microcontroller412. The response is detected by OD circuitry 420. Thus, microcontroller412 now knows that the OD2 contact is connected to ID module 408 anddesignates the line that is coupled to the OD2 contact as the accessorycommunication line (e.g., ACC_ID of FIG. 1E). Thus, in our example, oneof contacts 206 ₍₁₎ or 206 ₍₈₎ now carries the accessory communicationsignal and the other contact can be designated as the accessory powercontact (e.g., ACC_PWR of FIG. 1E). Based on the location/position ofthe accessory communication contact and the accessory power contact,host device 402 can now determine the orientation of the connector 406with respect to connector 404.

FIG. 5 is a flow diagram of a process 500 for determining orientation ofan accessory-side connector with respect to a host-side connectoraccording to an embodiment of the present invention. Process 500 may beperformed, e.g., by host device 402 of FIG. 4.

At block 502, the host device may detect coupling of the accessory(first) connector with its own (second) connector. In other words, thehost device may detect that the accessory connector has been physicallycoupled to its own connector, e.g., via the connector detector contactin its connector. Once the host device determines that the accessoryconnector is physically coupled to its connector, the host device may,via the microcontroller, send a command over a first contact, e.g., OD1of FIG. 4, of its connector, e.g., the OD1 contact described above atblock 504. For example, the host device may send the ID commanddescribed below in reference to FIG. 7A. Once the command is sent, thehost device may wait for a response to the command from the accessory.At block 506, the host device may check whether a response to thecommand was received from the accessory over the first contact. If aresponse is received over the first contact, the host device maydetermine the orientation of the accessory connector with respect to itsown connector at block 508. For instance, based on the response, thehost device now knows which contact in its own connector is coupled tothe ID module in the accessory-side connector and can thereforedesignate that contact as the ID bus line or accessory communicationline. Once the ID bus line/contact is known, the host device candetermine the orientation in which the accessory connector is pluggedin. Once the orientation is known, the host device may configure therest of the contacts of the second connector based on the determinedorientation, at block 510.

If at block 506, the host device receives no response to the command,the host device can send the same command over a second contact, e.g.,OD2 of FIG. 4, in its connector at block 512. At block 514, the hostdevice can again check to see if a valid response is received from theID module for the command over the second contact. If a valid responseis received, process 500 proceeds to blocks 508 and 510 as describedabove and the host device configures the rest of the contacts in its own(second) connector accordingly. If no response is received at block 514,the process returns to block 504 where the host device sends the samecommand over the first contact again. Thus, the host device mayalternately send the command over the first and the second contactsuntil it receives a valid response on one of the contacts. In someembodiments, process 500 may be programmed to time out after a certainduration or after a certain number of attempts.

It should be appreciated that the specific steps illustrated in FIG. 5provides a particular method of determining orientation according to anembodiment of the present invention. Other sequences of steps may alsobe performed according to alternative embodiments. For example,alternative embodiments of the present invention may perform the stepsoutlined above in a different order. Moreover, the individual stepsillustrated in FIG. 5 may include multiple sub-steps that may beperformed in various sequences as appropriate to the individual step.Furthermore, additional steps may be added or removed depending on theparticular applications. In particular, several steps may be omitted insome embodiments. One of ordinary skill in the art would recognize manyvariations, modifications, and alternatives.

Certain embodiments of the present invention provide techniques fordynamically configuring contacts of a host-side connector. Theconfiguring of the contacts may be done without first determiningorientation of the accessory-side connector. In some embodiments, thehost device may send a command to the accessory, as described above. Theresponse to the command may include information about the contactassignment/configuration for the accessory-side connector. The accessorymay provide this contact assignment information to the host device in aresponse packet similar to the one described below. Details of thecommand and response are described below in connection with FIGS. 7A and7B. In addition to the contact configuration information, the accessory,e.g., via ID module 408, may also send configuration information of theaccessory, an accessory identifier, etc. to the host device.

In some embodiments, the accessory configuration information may alsoinclude type of accessory, types of signals provided/required by theaccessory, etc. among other things. For example, the accessory mayprovide information about the signal that each contact of connector 406is configured to carry. For example, a first contact may carry a powersignal; a second contact may carry a data signal, etc. Once themicrocontroller 412 receives this contact configuration information fromthe accessory, it can operate switches 1-N associated with thecorresponding contacts in connector 404 to configure the contacts tocarry the same signals as the corresponding contacts in connector 406.

It is to be noted that contact configuration in the host device canoccur independent of orientation detection for the accessory-sideconnector. For example, accessory-side connector, e.g., connector 406,can only be connected to connector 404 in a single orientation. In thisinstance there is no need for determining orientation of connector 406with respect to connector 404. Upon connection, the accessory can sendcontact configuration information for connector 406 to the host device.The host device can then configure the contacts of its own connector 404to match those of connector 406. Thus, in some embodiments, contactconfiguration may be performed without first performing orientationdetection.

Once the contacts in connector 404 are configured properly, a continuouselectrical link is established between device 402 and the accessory anddevice 402 can then communicate with the accessory in a substantivemanner, e.g., exchange commands and data, run application programs, etc.

FIG. 6 is a flow diagram of a process 600 for configuring contacts of aconnector according to an embodiment of the present invention. Process600 can be performed, e.g., by device 402 of FIG. 4.

The host device initially detects physical connection between thehost-side connector and the accessory-side connector (block 602). In anembodiment, the host device may use the connection detection contactdescribed above to determine the physical connection. Once the twoconnectors are physically connected, the host device may send a commandto the accessory to provide configuration information about the contactson the accessory-side connector (block 604). In some embodiments, thehost device need not even request this information and the accessory mayautomatically provide this information upon determination of physicalconnection between the two connectors. The host device receives thecontact configuration information from the accessory (block 606). Thecontact configuration information enables the host device to determinethe functionality associated with each contact in the accessory-sideconnector. Based on this information, the host device configurescontacts in the host-side connector to match the functionality of thecorresponding accessory-side connector contacts (block 608). In someembodiments, the host device may operate switches 1-N illustrated inFIG. 4 to impart the appropriate functionality to some of the contactsin the host-side connector.

In some embodiments, the accessory may not even send the contactconfiguration information to the host device. Instead the host devicemay determine the type of accessory connected to it based on, e.g., anaccessory identifier. Once the type of accessory is determined, the hostsystem may consult a look-up table in order to determine contactconfiguration of the accessory-side connector and accordingly configurethe contacts of the host-side connector. In this instance, the look-uptable may include contact configuration information for variousaccessory-side connectors that may be indexed using a unique accessoryidentifier associated with each accessory.

It should be appreciated that the specific steps illustrated in FIG. 6provides a particular method for configuring contacts according to anembodiment of the present invention. Other sequences of steps may alsobe performed according to alternative embodiments. For example,alternative embodiments of the present invention may perform the stepsoutlined above in a different order. Moreover, the individual stepsillustrated in FIG. 6 may include multiple sub-steps that may beperformed in various sequences as appropriate to the individual step.Furthermore, additional steps may be added or removed depending on theparticular applications. In particular, several steps may be omitted insome embodiments. One of ordinary skill in the art would recognize manyvariations, modifications, and alternatives.

In some embodiments, the configuration of the accessory-side contactsmay be changed by the accessory after providing an initial configurationinformation. This may happen in instances where the accessory is capableof performing two different functions, e.g., USB and UART. Initially,the accessory may specify the accessory-side connector contacts as beingconfigured for USB signals and communicate that information to the host.The host may then configure the contacts of its host-side connector tomatch the accessory-side connector contacts. Then during operation,consider that the accessory changes the accessory-side connectorcontacts to now carry UART signals. In this instance, the accessory cansend new configuration information to the host device and the hostdevice can dynamically change the configuration of the host-sideconnector contacts to match the new configuration.

As described above, when the ID module receives a command from themicrocontroller, it sends a predetermined response back to themicrocontroller. FIGS. 7A and 7B illustrate a command and responsesequence according to an embodiment of the present invention.

FIG. 7A illustrates a structure for a command sequence 700 that can besent by the microcontroller over the OD1 or the OD2 lines according toan embodiment of the present invention. Command sequence 700 may includea break pulse 702. In some embodiments, break pulse 702 may be used toindicate to the ID module that a command is being sent by themicrocontroller and/or to indicate start of a command. In someembodiments, the duration of break pulse may be programmable. In someembodiments, break pulse 702 resets the ID module to a known state sothat the ID module is ready to receive the command from themicrocontroller. Break pulse 702 may be followed by a command 704. Insome embodiments, command 704 can include between 8 and 16 bits. In someembodiments, command 704 can be followed by a N-byte payload 706. Inother embodiments, command 704 can be sent without any payload. For thepurposes of detecting orientation, command 704 can be followed by up to16 bits of payload 706. In this instance, payload 706 may include aunique identifier associated with the microcontroller. The uniqueidentifier can be used by the ID module to recognize the microcontrollerand/or the device and formulate a response to command 704. For example,the unique identifier may inform the ID module whether the device isphone, a media player, or a personal computing device, e.g., a tabletcomputer, or a debug accessory.

In some embodiments, payload 706 (or command 704) may be followed byCyclic Redundancy Check (CRC) sequence 708. CRC is an error-detectingcode designed to detect accidental changes to raw computer data, and iscommonly used in digital networks and storage devices. Blocks of dataentering these systems get a short check value attached, derived fromthe remainder of a polynomial division of their contents; on retrievalthe calculation is repeated, and corrective action can be taken againstpresumed data corruption if the check values do not match. In someembodiments, CRC sequence 708 can be generated using a 8 polynomialfunction of X⁸+X⁷+X⁴+1. In some embodiments, CRC 708 may be followed byanother break pulse 702 signaling end of the command sequence. Thisindicates to the ID module that the microcontroller has finish sendingthe command and associated data, if any, and is now ready to receive aresponse. It is to be understood that only the ID module can interpretand respond to this command. Thus, if command sequence 700 is sent overa line that is not connected to the ID module, the microcontroller inthe host device will not receive a response to the command. In someembodiments, the command may time-out if a response is not received fromthe host device. In this instance, the microcontroller will concludethat the line is not connected to the ID module and hence is not the IDbus line.

One skilled in the art will realize the command sequence 700 isillustrative only and may include more or less information than shown inFIG. 7A depending on the specific requirements for communication betweenthe device and the accessory that includes the ID module.

Once the ID module receives command sequence 700, it may send a responsesequence 720 as illustrated in FIG. 7B. Response sequence 720 mayinclude a command response 722. Command response 722 may be apredetermined response for command 704. For example, regardless of thetype of device connected, each ID module may generate the same commandresponse 722 in response to receiving command 704 from the device.Response sequence 720 may also include payload 724, which may be up to48-bits long. In some embodiments, payload 724 may include an identifierassociated with the accessory incorporating the ID module, e.g., aserial number of the accessory. In some embodiments, payload 724 mayalso include configuration information associated with the accessorysuch as type of accessory, various signals needed by the accessory inorder to communicate with the device, etc. In some embodiments, payload724 may include information about functionality associated with each ifthe contacts in the accessory-side connector. For example, up to 4 bitsmay be used to indicate functionality to be imparted to the OD1 and OD2switches. In some embodiments, up to 2 pairs of 2-bits each in payload724 may inform the microcontroller on how to configure the switches 1-N,where N=4 or in other words which functionality is to be imparted to thecontacts associated with switches 1-N. Once configured, the switchesconnect the various contacts in connector 404 to other circuitry withindevice 402. It is to be understood that additional bits may be used foradditional switches and the system is expandable. Thus, upon receivingthe command response, the microcontroller now knows how to configure thevarious switches 1-N, OD1, and OD2 described above. In some embodiments,payload 724 may be followed by CRC 726. CRC 726 may be similar to CRC708. In some embodiments, the total duration for sending commandsequence 700 and receiving response sequence 720 is about 3milliseconds. Details of the command and response structure and theircontents is described in a co-pending U.S. patent application No.______, filed on ______ (Attorney Docket No. 90911-818777), the contentsof which are incorporated by reference herein in its entirety for allpurposes.

Referring back to FIG. 4, in some embodiments, if connector 406 isphysically removed/detached from connector 404, device 402 detects theremoval via connector detect 414 and as a result, microcontroller 412places all the switches 1-N in an ‘open’ state. For example, if a logic“high” is detected on signal line 414 for longer than a predeterminedduration, the microcontroller can conclude that connector 406 has beendetached from connector 404 and may instruct device 402 accordingly. Insome embodiments, the predetermined duration is between 20 μs and 100μs.

The embodiments described above can be independent of each other. Forexample, orientation detection can be performed without being followedby contact configuration. Orientation detection may be useful ininstances where the contacts all have fixed functionality and it isdesirable to only determine which way the accessory-side connector isconnected to the host-side connector. Also, in another embodiment,contact configuration can be performed without first determiningorientation of the accessory-side connector with respect to thehost-side connector. For example, in some instances, the two connectorscan only be mated in a single orientation. In this instance there is noneed for determining orientation and upon connection the host device mayconfigure the host-side connector contacts based on the accessory-sideconnector.

In yet another embodiment of the present invention, contactconfiguration can follow and be based on the orientation of theaccessory-side connector with respect to the host-side connector. Forexample, in instances where two connectors can be mated with each otherin more than one orientation, it may be beneficial to first determinethe orientation of one connector with respect to another (e.g., usingthe technique described above) and then configure the contacts based onthe determined orientation.

FIG. 8A is a cross-sectional view illustrating an accessory-sideconnector 100 (or connector 101) mated with a host-side connector 250according to an embodiment of the present invention. As illustrated inFIG. 8A, contact 114(1) of connector 100 is in contact with contact206(1) of connector 250. Connector 100 is reversible and can be matedwith connector 250 in at least two orientations. In addition to theorientation illustrated in FIG. 8A, connector 100 can also be mated withconnector 250 in another orientation illustrated in FIG. 8B. In theother orientation contact 112(8) of connector 100 is in contact withcontact 206(1) of connector 250. Thus, it can be seen that in the twoorientations, two different contacts of connector 100 can be coupled tothe same contact of connector 250. Thus, in this instance it would bebeneficial to first determine which orientation connector 100 is matedbefore any of the contacts are configured. For example, since some ofthe contacts may carry power, it would be detrimental if the incorrectcontact on the host-side connector is enabled to carry power.

In this embodiment, once it is determined that connector 100 isphysically connected to connector 250, e.g., using the connectiondetection contact described above, the host device then attempts todetermine in which orientation is connector 100 mated with connector250. In other words, the host device determines which contacts ofconnector 100 are actually physically connected to the contacts ofconnector 250. Once the orientation is determined, the host device canuse that information and the contact configuration information ofconnector 100 to configure the contacts of connector 250.

FIGS. 9A and 9B illustrate a flow diagram for a process 900 fordetermining orientation and configuring contacts of a connectoraccording to an embodiment of the present invention. Process 900 may beperformed by, e.g., host device 402 of FIG. 4.

As described above, when the host device is not connected to anyaccessory via its host-side connector, all the switches that control thecontacts of the host-side connector are in an “open” state thus placingall the contacts in a deactivated/isolated state. This is done to ensurethat no unwanted signal can be received by the host device thusprotecting the host device from any damage. At block 902 the host devicedetermines that an accessory-side connector has been physically matedwith its host-side connector, e.g., using the connection detectioncontact in the host-side connector. In response to detecting physicalmating of the two connectors, the host device, at block 904, closes aswitch associated with a first contact of the host-side connector to beused for detecting orientation. This results in the first contact beingactivated or in other words a continuous connection path now existsbetween host device and the accessory via the first contact.

Thereafter, the host device sends a command to the accessory over thefirst contact at block 906. In some embodiments, the command may requestcertain information from the accessory. After sending the command overthe first contact, the host device then waits to receive a response backfrom the accessory, at block 908. Thereafter the host device checks tosee if a response was received from the accessory at block 910. If thehost device receives a response from the accessory on the first contact,the host device designates the first contact as carrying the accessorycommunication signals. As described above, the command sent by the hostdevice can only be interpreted by an ID module in the accessory or theaccessory-side connector. Thus, the fact that a response was received onthe first contact means that the first contact is coupled to the IDmodule in the accessory.

Once it is determined that the first contact is coupled to the accessorycommunication contact of the accessory-side connector, the host devicecan determine orientation of the accessory-side connector with respectto the host-side connector at block 912. In other words, the host devicenow knows which contacts of the accessory-side connector are in physicalcontact with contacts of the host-side connector. The response receivedfrom the accessory over the first contact includes information thatspecifies functionality associated with each of the contacts of theaccessory-side connector. The host device, at block 914, can analyze theinformation received from the accessory and determine the functionassociated with each contact of the accessory-side connector. Based onthis information and the previously determined orientation informationthe host device now knows which contacts of the host-side connector areto be assigned which function in order to be compatible with theaccessory-side connector. In order to accomplish this, the host device,at block 916, operates a switch associated with one or more of thecontacts of the host-side connector in order to configure the contact toenable the determined function.

However, if at block 910 the host device does not receive any responsefrom the accessory, the host device opens the first switch anddeactivates the first contact at block 918, as illustrated in FIG. 9B.Thereafter at block 920 the host device closes a second switchassociated with a second contact and activates the second contact. Atblock 922, the host device sends the same command over the secondcontact and waits for a response from the accessory. If a response fromthe accessory is received at block 924 over the second contact, process900 continues to step 912. If the host device does not receive aresponse from the host device at block 924, the host device opens thesecond switch and deactivates the second contact at block 928.Thereafter process 900 returns to step 904 where the first contact isagain activated.

Host device may alternately activate the first contact and the secondcontact, send the command over the active contact, and wait for aresponse from the accessory. In some embodiments, the host device mayrepeat this process indefinitely until it receives a response from theaccessory. In other embodiments, after expiration of a predeterminedtime duration, the host may stop process 900 and report an error. Insome embodiments, the first contact and the second contact used fordetermining orientation are predetermined and programmed into the hostdevice. In other embodiments, the first and/or the second contact may bedynamically selected.

It should be appreciated that the specific steps illustrated in FIGS. 9Aand 9B provides a particular method for determining orientation andconfiguring contacts according to an embodiment of the presentinvention. Other sequences of steps may also be performed according toalternative embodiments. For example, alternative embodiments of thepresent invention may perform the steps outlined above in a differentorder. Moreover, the individual steps illustrated in FIGS. 9A and 9B mayinclude multiple sub-steps that may be performed in various sequences asappropriate to the individual step. Furthermore, additional steps may beadded or removed depending on the particular applications. Inparticular, several steps may be omitted in some embodiments. One ofordinary skill in the art would recognize many variations,modifications, and alternatives.

Circuits, logic modules, processors, and/or other components can bedescribed herein as being “configured” to perform various operations.Those skilled in the art will recognize that, depending onimplementation, such configuration can be accomplished through design,setup, interconnection, and/or programming of the particular componentsand that, again depending on implementation, a configured componentmight or might not be reconfigurable for a different operation. Forexample, a programmable processor can be configured by providingsuitable executable code; a dedicated logic circuit can be configured bysuitably connecting logic gates and other circuit elements; and so on.

While the embodiments described above can make reference to specifichardware and software components, those skilled in the art willappreciate that different combinations of hardware and/or softwarecomponents can also be used and that particular operations described asbeing implemented in hardware might also be implemented in software orvice versa.

Computer programs incorporating various features of the presentinvention can be encoded on various non-transitory computer readablestorage media; suitable media include magnetic disk or tape, opticalstorage media, such as compact disk (CD) or DVD (digital versatiledisk), flash memory, and the like. Computer readable storage mediaencoded with the program code can be packaged with a compatible deviceor provided separately from other devices. In addition program code canbe encoded and transmitted via wired optical, and/or wireless networksconforming to a variety of protocols, including the Internet, therebyallowing distribution, e.g., via Internet download.

Thus, although the invention has been described with respect to specificembodiments, it will be appreciated that the invention is intended tocover all modifications and equivalents within the scope of thefollowing claims.

What is claimed is:
 1. An electronic device comprising: a first connector having a plurality of contacts; and control circuitry operatively coupled to at least some of the plurality of contacts, wherein the control circuitry is configured to: detect when a second connector is mated with the first connector, in response to the detection, send a command over a first contact in the plurality of contacts, and if a response to the command is received over the first contact, set internal connections to one or more contacts in the plurality of contacts.
 2. The electronic device of claim 1 further comprising detection circuitry configured to: in response to detecting mating of the second connector, switch the first contact from an open state to be connected with the control circuitry thereby enabling the control circuitry to send the command over the first contact.
 3. The electronic device of claim 1 wherein if no response is received over the first contact, the control circuitry is further configured to send the command over a second contact in the plurality of contacts.
 4. The electronic device of claim 1 wherein the response includes information about configuration of contacts in the second connector.
 5. The electronic device of claim 4 wherein the control circuitry sets internal connections to the one or more contacts in the plurality of contacts based on the configuration information of the contacts in the second connector.
 6. The electronic device of claim 1 wherein to detect when the second connector is mated with the first connector, the control circuitry is further configured to: monitor a connection detection contact in the plurality of contacts; and determine that the second connector is mated with the first connector when it detects a logic low on the connection detection contact.
 7. The electronic device of claim 1 wherein the first connector is a receptacle connector and the second connector is a plug connector.
 8. The electronic device of claim 7 wherein the detect step detects when the plug connector is inserted into the receptacle connector.
 9. The electronic device of claim 1 wherein the first connector comprises: a housing that forms a cavity configured to receive the second connector; and wherein the plurality of contacts are arranged as a single row on an anterior surface of the cavity.
 10. The electronic device of claim 9 further comprising a retention latch disposed on an external side of the housing.
 11. The electronic device of claim 9 wherein the plurality of contacts include between 2 and 10 signal contacts.
 12. The electronic device of claim 1 wherein the first connector comprises: a housing that forms a cavity configured to receive the second connector; and wherein the plurality of contacts are arranged in a first row and a second row along a top anterior surface of the cavity and a bottom anterior surface of the cavity, respectively.
 13. The electronic device of claim 12 wherein the first row and the second row each has equal number of contacts arranged therein.
 14. An electronic device comprising: a first connector having a first plurality of contacts including a signal contact and a detection contact; and detection circuitry operatively coupled to the detection contact and the signal contact, wherein the detection circuitry is configured to: monitor the detection contact to detect connection of a second connector with the first connector, wherein the second connector includes a second plurality of contacts and is associated with an accessory, receive a message from the accessory via the signal contact, the message including configuration information for the second set of contacts; and configure at least one of the first plurality of contacts based on the configuration information for the second plurality of contacts.
 15. The electronic device of claim 14 wherein the configuration information for the second set of contacts includes information about a function associated with one or more of the second plurality of contacts.
 16. The electronic device of claim 14 wherein the first plurality of contacts includes up to 16 contacts.
 17. The electronic device of claim 14 wherein the first connector is a receptacle connector and the second connector is a plug connector.
 18. The electronic device of claim 14 wherein the first connector comprises: a housing that forms a cavity configured to receive the second connector; and wherein the first plurality of contacts are arranged as a single row on an anterior surface of the cavity.
 19. A method of configuring a receptacle connector having a housing that defines an interior cavity into which a plug connector can be inserted in either a first orientation or a second orientation rotated 180 degrees from the first orientation and a first plurality of electrical contacts positioned along a first interior surface of the interior cavity, the plug connector having a second plurality of electrical contacts, the method comprising: detecting, by a first device coupled to the receptacle connector, insertion of the plug connector into the interior cavity, wherein each contact in the second plurality of electrical contacts is in physical contact with a corresponding contact in the first plurality of electrical contacts; sending, by the first device, via the receptacle connector, a signal over a first contact from the first plurality of electrical contacts; monitoring, by the first device, the first contact to determine if a response is received for the signal; if the response is not received over the first contact, sending, by the first device, via the receptacle connector, a signal over a second contact of the first plurality of electrical contacts; monitoring, by the first device, a second contact to determine if a response is received for the signal; determining, by the first device, whether the plug connector is inserted in the first orientation or the second orientation based on whether the response is received over the first contact or the second contact; receiving, by the first device, configuration information for the second plurality of contacts of the plug connector; setting, by the first device, internal connections to at least some of the first plurality of electrical contacts according to a first mapping when the plug connector is inserted into the interior cavity in the first orientation and setting internal connections to the at least some of the first plurality of electrical contacts according to a second mapping when the plug connector is inserted into the interior cavity in the second orientation.
 20. The method of claim 19 wherein the signal comprises a request and the response comprises a response to the request.
 21. The method of claim 20 wherein the request is for sending identification information associated with an accessory coupled to the plug connector.
 22. The method of claim 19 wherein detecting insertion of the plug connector into the interior cavity further comprises: electrically coupling at least one contact from the first plurality of electrical contacts to a ground contact of the plug connector; receiving, by the first device, an indication indicating the coupling; and determining, by the first device, that the plug connector is inserted into the receptacle connector based on the indication.
 23. The method of claim 22 wherein the indication comprises an electrical signal equivalent to a logic low.
 24. An electronic device comprising: a receptacle connector including a first set of electrical contacts, wherein the receptacle connector is capable of accepting a plug connector that can be mated either in a first orientation or a second orientation 180 degrees rotated from the first orientation; and circuitry coupled to the receptacle connector and configured to: detect mating of the plug connector to the receptacle connector, wherein the plug connector includes a second set of electrical contacts; in response to the detection, send a command over a first contact from the first set of electrical contacts; monitor the first contact to determine whether a response to the command was received over the first contact; receive the response over the first contact; determine that the plug connector is mated in the first orientation based on the response; receive configuration information about the second set of electrical contacts of the plug connector; and configure at least one contact in the first set of contacts based on the first orientation and the configuration information about the second set of contacts.
 25. The electronic device of claim 24 wherein the circuitry is further configured to: if the response is not received over the first contact, send the command over a second contact from the first set of contacts; monitor the second contact to determine whether a response to the command was received over the second contact; if the response is received over the second contact, determine that the plug connector is mated in the second orientation; receive configuration information about the second set of contacts of the plug connector; and configure at least one contact in the first set of contacts based on the second orientation and the configuration information about the second set of contacts.
 26. The electronic device of claim 25 wherein the circuitry is further configured to: activate the first contact by closing a first switch associated with the first contact prior to sending the command over the first contact; and activate the second contact by closing a second switch associated with the second contact and deactivate the first contact by opening the first switch prior to sending the command over the second contact. 